<!DOCTYPE html><html><head><title>Ext.WindowManager | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
<style type="text/css">.head-band { display: none; }
.header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
.doc-tab .members .member a.more { background-color: #efefef; }
</style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
</head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
<a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">

    req = {
        liveURL: '.',
        standAloneMode: true,
        origDocClass: 'Ext.WindowManager',
        docClass: 'Ext.WindowManager',
        docReq: 'Ext.WindowManager',
        version: '4.0',
        baseURL: '.',
        baseDocURL: '.',
        baseProdURL: '.'
    };

    clsInfo = {};



</script>

<script type="text/javascript" src="../search.js"></script>
<!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
<script type="text/javascript" src="../class_tree.js"></script>
<script type="text/javascript" src="../class_doc.js"></script>
<script type="text/javascript">
    req.source = 'ZIndexManager.html#Ext-WindowManager';
    clsInfo = {"methods":["WindowManager","bringToFront","each","eachBottomUp","eachTopDown","get","getActive","getBy","hideAll","register","sendToBack","unregister"],"cfgs":[],"properties":[],"events":[],"subclasses":[]};
    Ext.onReady(function() {
        Ext.create('Docs.classPanel');
    });
</script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/ZIndexManager.html#Ext-WindowManager" target="_blank">Ext.WindowManager</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><pre class="subclasses"><h4>Hierarchy</h4><div class="subclass f"><a href="Ext.ZIndexManager.html" rel="Ext.ZIndexManager" class="cls docClass">Ext.ZIndexManager</a><div class="subclass"><strong>Ext.WindowManager</strong></div></div></pre><p>The default global floating Component group that is available automatically.</p>


<p>This manages instances of floating Components which were rendered programatically without
being added to a <a href="Ext.container.Container.html" rel="Ext.container.Container" class="docClass">Container</a>, and for floating Components which were added into non-floating Containers.</p>


<p><i>Floating</i> Containers create their own instance of ZIndexManager, and floating Components added at any depth below
there are managed by that ZIndexManager.</p>

<div class="members"><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-WindowManager" class="member f inherited"><a href="Ext.WindowManager.html#method-WindowManager" rel="method-WindowManager" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-constructor" class="viewSource">view source</a></div><a name="WindowManager"></a><a name="method-WindowManager"></a><a href="Ext.WindowManager.html#" rel="method-WindowManager" class="cls expand">WindowManager</a> : void</div><div class="description"><div class="short"><p>&nbsp;</p></div><div class="long">
<h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-bringToFront" class="member inherited"><a href="Ext.WindowManager.html#method-bringToFront" rel="method-bringToFront" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-bringToFront" class="viewSource">view source</a></div><a name="bringToFront"></a><a name="method-bringToFront"></a><a href="Ext.WindowManager.html#" rel="method-bringToFront" class="cls expand">bringToFront</a>(
<span class="pre">String/Object comp</span>)
 : Boolean</div><div class="description"><div class="short"><p>Brings the specified Component to the front of any other active Components in this ZIndexManager.</p>
</div><div class="long"><p>Brings the specified Component to the front of any other active Components in this ZIndexManager.</p>
<h3 class="pa">Parameters</h3><ul><li><span class="pre">comp</span> : String/Object<div class="sub-desc"><p>The id of the Component or a <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> instance</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the dialog was brought to the front, else false
if it was already in front</p>
</li></ul></div></div></div><div id="method-each" class="member inherited"><a href="Ext.WindowManager.html#method-each" rel="method-each" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-each" class="viewSource">view source</a></div><a name="each"></a><a name="method-each"></a><a href="Ext.WindowManager.html#" rel="method-each" class="cls expand">each</a>(
<span class="pre">Function fn, [Object scope]</span>)
 : void</div><div class="description"><div class="short">Executes the specified function once for every Component in this ZIndexManager, passing each
Component as the only pa...</div><div class="long"><p>Executes the specified function once for every Component in this ZIndexManager, passing each
Component as the only parameter. Returning false from the function will stop the iteration.</p>
<h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to execute for each item</p>
</div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to the current Component in the iteration.</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-eachBottomUp" class="member inherited"><a href="Ext.WindowManager.html#method-eachBottomUp" rel="method-eachBottomUp" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-eachBottomUp" class="viewSource">view source</a></div><a name="eachBottomUp"></a><a name="method-eachBottomUp"></a><a href="Ext.WindowManager.html#" rel="method-eachBottomUp" class="cls expand">eachBottomUp</a>(
<span class="pre">Function fn, [Object scope]</span>)
 : void</div><div class="description"><div class="short">Executes the specified function once for every Component in this ZIndexManager, passing each
Component as the only pa...</div><div class="long"><p>Executes the specified function once for every Component in this ZIndexManager, passing each
Component as the only parameter. Returning false from the function will stop the iteration.
The components are passed to the function starting at the bottom and proceeding to the top.</p>
<h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to execute for each item</p>
</div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function
is executed. Defaults to the current Component in the iteration.</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-eachTopDown" class="member inherited"><a href="Ext.WindowManager.html#method-eachTopDown" rel="method-eachTopDown" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-eachTopDown" class="viewSource">view source</a></div><a name="eachTopDown"></a><a name="method-eachTopDown"></a><a href="Ext.WindowManager.html#" rel="method-eachTopDown" class="cls expand">eachTopDown</a>(
<span class="pre">Function fn, [Object scope]</span>)
 : void</div><div class="description"><div class="short">Executes the specified function once for every Component in this ZIndexManager, passing each
Component as the only pa...</div><div class="long"><p>Executes the specified function once for every Component in this ZIndexManager, passing each
Component as the only parameter. Returning false from the function will stop the iteration.
The components are passed to the function starting at the top and proceeding to the bottom.</p>
<h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to execute for each item</p>
</div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function
is executed. Defaults to the current Component in the iteration.</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-get" class="member inherited"><a href="Ext.WindowManager.html#method-get" rel="method-get" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-get" class="viewSource">view source</a></div><a name="get"></a><a name="method-get"></a><a href="Ext.WindowManager.html#" rel="method-get" class="cls expand">get</a>(
<span class="pre">String/Object id</span>)
 : Ext.Component</div><div class="description"><div class="short"><p>Gets a registered Component by id.</p>
</div><div class="long"><p>Gets a registered Component by id.</p>
<h3 class="pa">Parameters</h3><ul><li><span class="pre">id</span> : String/Object<div class="sub-desc"><p>The id of the Component or a <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> instance</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.Component</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-getActive" class="member inherited"><a href="Ext.WindowManager.html#method-getActive" rel="method-getActive" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-getActive" class="viewSource">view source</a></div><a name="getActive"></a><a name="method-getActive"></a><a href="Ext.WindowManager.html#" rel="method-getActive" class="cls expand">getActive</a> : Ext.Component</div><div class="description"><div class="short"><p>Gets the currently-active Component in this ZIndexManager.</p>
</div><div class="long"><p>Gets the currently-active Component in this ZIndexManager.</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.Component</span>&nbsp; &nbsp;<p>The active Component</p>
</li></ul></div></div></div><div id="method-getBy" class="member inherited"><a href="Ext.WindowManager.html#method-getBy" rel="method-getBy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-getBy" class="viewSource">view source</a></div><a name="getBy"></a><a name="method-getBy"></a><a href="Ext.WindowManager.html#" rel="method-getBy" class="cls expand">getBy</a>(
<span class="pre">Function fn, [Object scope]</span>)
 : Array</div><div class="description"><div class="short">Returns zero or more Components in this ZIndexManager using the custom search function passed to this method.
The fun...</div><div class="long"><p>Returns zero or more Components in this ZIndexManager using the custom search function passed to this method.
The function should accept a single <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> reference as its only argument and should
return true if the Component matches the search criteria, otherwise it should return false.</p>
<h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The search function</p>
</div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to the Component being tested.
that gets passed to the function if not specified)</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Array</span>&nbsp; &nbsp;<p>An array of zero or more matching windows</p>
</li></ul></div></div></div><div id="method-hideAll" class="member inherited"><a href="Ext.WindowManager.html#method-hideAll" rel="method-hideAll" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-hideAll" class="viewSource">view source</a></div><a name="hideAll"></a><a name="method-hideAll"></a><a href="Ext.WindowManager.html#" rel="method-hideAll" class="cls expand">hideAll</a> : void</div><div class="description"><div class="short"><p>Hides all Components managed by this ZIndexManager.</p>
</div><div class="long"><p>Hides all Components managed by this ZIndexManager.</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-register" class="member inherited"><a href="Ext.WindowManager.html#method-register" rel="method-register" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-register" class="viewSource">view source</a></div><a name="register"></a><a name="method-register"></a><a href="Ext.WindowManager.html#" rel="method-register" class="cls expand">register</a>(
<span class="pre">Component comp</span>)
 : void</div><div class="description"><div class="short">Registers a floating Ext.Component with this ZIndexManager. This should not
need to be called under normal circumstan...</div><div class="long"><p>Registers a floating <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> with this ZIndexManager. This should not
need to be called under normal circumstances. Floating Components (such as Windows, BoundLists and Menus) are automatically registered
with a <a href="Ext.Component.html#zIndexManager" rel="Ext.Component#zIndexManager" class="docClass">zIndexManager</a> at render time.</p>


<p>Where this may be useful is moving Windows between two ZIndexManagers. For example,
to bring the Ext.MessageBox dialog under the same manager as the Desktop's
ZIndexManager in the desktop sample app:</p>


<p><code></p>

<pre>MyDesktop.getDesktop().getManager().register(Ext.MessageBox);
</pre>


<p></code></p>
<h3 class="pa">Parameters</h3><ul><li><span class="pre">comp</span> : Component<div class="sub-desc"><p>The Component to register.</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-sendToBack" class="member inherited"><a href="Ext.WindowManager.html#method-sendToBack" rel="method-sendToBack" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-sendToBack" class="viewSource">view source</a></div><a name="sendToBack"></a><a name="method-sendToBack"></a><a href="Ext.WindowManager.html#" rel="method-sendToBack" class="cls expand">sendToBack</a>(
<span class="pre">String/Object comp</span>)
 : Ext.Component</div><div class="description"><div class="short"><p>Sends the specified Component to the back of other active Components in this ZIndexManager.</p>
</div><div class="long"><p>Sends the specified Component to the back of other active Components in this ZIndexManager.</p>
<h3 class="pa">Parameters</h3><ul><li><span class="pre">comp</span> : String/Object<div class="sub-desc"><p>The id of the Component or a <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> instance</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.Component</span>&nbsp; &nbsp;<p>The Component</p>
</li></ul></div></div></div><div id="method-unregister" class="member inherited"><a href="Ext.WindowManager.html#method-unregister" rel="method-unregister" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.ZIndexManager.html" class="definedIn docClass">Ext.ZIndexManager</a><br/><a href="../source/ZIndexManager.html#Ext-ZIndexManager-method-unregister" class="viewSource">view source</a></div><a name="unregister"></a><a name="method-unregister"></a><a href="Ext.WindowManager.html#" rel="method-unregister" class="cls expand">unregister</a>(
<span class="pre">Component comp</span>)
 : void</div><div class="description"><div class="short">Unregisters a Ext.Component from this ZIndexManager. This should not
need to be called. Components are automatically ...</div><div class="long"><p>Unregisters a <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> from this ZIndexManager. This should not
need to be called. Components are automatically unregistered upon destruction.
See <a href="Ext.WindowManager.html#register" rel="Ext.WindowManager#register" class="docClass">register</a>.</p>

<h3 class="pa">Parameters</h3><ul><li><span class="pre">comp</span> : Component<div class="sub-desc"><p>The Component to unregister.</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>